<template>
	 <view class="exclusive-coupon-page">
	 	<view class="exclusive-coupon-content">
	 		<view class="exclusive-coupon-title">
	 			<!-- 新东方山师二教育季，原价2698元198元8节线下体育课，立省2400元 -->
				{{ actTitle | goodName_value}}
	 		</view>
			<view class="set-exclusive-coupon" @click="setCoupon">
				设定面值优惠券
			</view>
	 	</view>
		<view class="exclusive-coupon-contain" v-if="actCouponList.length!=0">
			<view class="produce-coupon">
				本活动可产生优惠券
			</view>
			<view class="coupon-details" v-for="(item,index) in actCouponList" :key='index'>
				<view class="coupon-details-left">
					<view class="">
						<text>￥</text>{{item.deduction_amount}}
					</view>
					<view class="">
						每个付费项目限制使用1张
					</view>
				</view>
				<view class="coupon-details-right">
					<view class="coupon-title">
						{{item.activity_title | goodName}}
					</view>
					<view class="flash-sale">
						<view class="normal-use" v-if="item.status == 1">正常使用</view>
						<view class="cancel-use" v-else>取消使用</view>
						<!-- #ifdef H5 -->
							<view :class="item.customer_id == 0?'by-get':'by-get-no'" @click="share(item)">分享给家长</view>
						<!-- #endif -->
						<!-- #ifdef MP-WEIXIN -->
							<button style="color: #ffffff; padding: 0;" :class="item.customer_id == 0?'by-get':'by-get-no'" open-type="share" type="default">分享给家长</button>
						<!-- #endif -->
					</view>
					<view class="expire-time" @click="updataCoupon(item)">
						<view class="">
							修改优惠券
						</view>
						<image :src="imglink + 'organization/active_icon_go.png'" mode=""></image>
					</view>
				</view>
			</view>
		</view>
		<view class="coupon-explain">
			<view class="coupon-explain-title">优惠券说明：</view>
			<view class="common-coupon">1.每个优惠券都是独立的，分享一次只能领取一次。</view>
			<view class="common-coupon">2.请谨慎分享优惠券，如果家长使用优惠券，可以直接减免。可能会影响你的业绩提成。</view>
			<view class="common-coupon">3.每个项目每一个付费项目每1次只能使用1张优惠券。</view>
			<view class="common-coupon">4.活动项目优惠券，只限当前活动使用。</view>
		</view>
		<!-- 分享提示 -->
		<uni-popup ref="shareTip" :custom="true">
			<view class="popup_box_de_share">
				<image class="popup_box_close_share" :src="imglink + 'share_tip.png'"></image>
			</view>
		</uni-popup>
		<!-- 新增优惠券 -->
		<uni-popup ref="addCouponPopup" :custom="true">
			<view class="popup_box_de">
				<image class="popup_box_close" :src="imglink + 'home/popup-close.png'" @click="closeStateAdd"></image>
				<view class="popup_box_content">
					<view class="popup_box_title">
						<view class="popup-line" style="margin-left: 106upx;"></view>
						<view class="">新增优惠券</view>
						<view class="popup-line"></view>
					</view>
					<view class="popup_box_coupon-content">
						<view class="popup_box_coupon_sum">
							优惠券面值：减
							<input type="text" v-model="couponNum" placeholder="请输入减免金额"/>元
						</view>
						<view class="popup_box_coupon-validity">
							优惠券有效期：
						</view>
						<view class="act-time-set">
							<view class="">
								开始时间
							</view>
							<view class="start-data">
								<picker mode="date" :value="startDate" @change="dateStartChange">
								    <view>{{startDate}}</view>
								</picker>
							</view>
							<view class="start-time">
								<picker mode="time" :value="startTime" @change="timeStartChange">
								    <view>{{startTime}}</view>
								</picker>
							</view>
						</view>
						<view class="act-time-set">
							<view class="">
								结束时间
							</view>
							<view class="start-data">
								<picker mode="date" :value="endDate" @change="dateEndChange">
								    <view>{{endDate}}</view>
								</picker>
							</view>
							<view class="start-time">
								<picker mode="time" :value="endTime" @change="timeEndChange">
								    <view>{{endTime}}</view>
								</picker>
							</view>
						</view>
						<view class="popup_box-set-coupon" @click="addCoupon">
							立刻设定优惠券
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 编辑优惠券 -->
		<uni-popup ref="editCouponPopup" :custom="true">
			<view class="popup_box_de">
				<image class="popup_box_close" :src="imglink + 'home/popup-close.png'" @click="closeState"></image>
				<view class="popup_box_content">
					<view class="popup_box_title">
						<view class="popup-line" style="margin-left: 106upx;"></view>
						<view class="">修改优惠券</view>
						<view class="popup-line"></view>
					</view>
					<view class="popup_box_coupon-content">
						<view class="popup_box_coupon_sum">
							优惠券面值：减
							<input type="number" v-model="couponNum" placeholder="请输入减免金额"/>元
						</view>
						<view class="popup_box_coupon-validity">
							优惠券有效期：
						</view>
						<view class="act-time-set">
							<view class="">
								开始时间
							</view>
							<view class="start-data">
								<picker mode="date" :value="startDate" @change="dateStartChange">
								    <view>{{startDate}}</view>
								</picker>
							</view>
							<view class="start-time">
								<picker mode="time" :value="startTime" @change="timeStartChange">
								    <view>{{startTime}}</view>
								</picker>
							</view>
						</view>
						<view class="act-time-set">
							<view class="">
								结束时间
							</view>
							<view class="start-data">
								<picker mode="date" :value="endDate" @change="dateEndChange">
								    <view>{{endDate}}</view>
								</picker>
							</view>
							<view class="start-time">
								<picker mode="time" :value="endTime" @change="timeEndChange">
								    <view>{{endTime}}</view>
								</picker>
							</view>
						</view>
						<view class="popup_box-set-coupon" style="margin-top: 32upx;" @click="editCoupon">
							确定修改
						</view>
						<view class="stop-use" @click="stopUse">
							停止使用
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
	 </view>
</template>

<script>
	import uniPopup from '../../../../components/uni-popup/uni-popup.vue'
	//#ifdef H5
	import wx from '@/common/wx-js-sdk.js'
	//#endif
	export default{
		filters: {
			goodName(value) {
				if (!value) return ''
				if (value.length > 27) {
					return value.slice(0, 27) + '...'
				}
				return value
			},
			goodName_value(value) {
				if (!value) return ''
				if (value.length > 40) {
					return value.slice(0, 40) + '...'
				}
				return value
			}
		},
		components:{uniPopup},
		data(){
			return{
				imglink: this.$store.state.imgLink,
				startDate:'',
				y:'',
				m:'',
				d:'',
				h:'',
				min:"",
				startTime:'',
				endDate:'',
				endTime:'',
				lastEndDay:'',
				couponNum:'',
				actId:'',
				start_date:'',//活动开始时间年月日时分
				end_date:'',//活动结束时间年月日时分
				startAllTime:'',//开始时间 毫秒
				endAllTime:'',//结束时间 毫秒
				pageSize:3,
				actCouponList:[],
				activity_coupon_id:'',
				customer_id:'',
				customer_receive_date:'',
				used:'',
				used_date:'',
				status:"",
				store_id:'',
				actTitle:'',
				store_info:{},
				activity_coupon_customer_id:''
			}
		},
		onLoad(option) {
			console.log(option)
			let store_id = parseInt(option.store_id,10);
			if(!store_id>0){
				store_id = uni.getStorageSync('store_id')
			}else{
				uni.setStorageSync('store_id', store_id)
			}
			this.store_id = store_id
			this.$store.commit('updateStoreId',store_id)
			this.actId = uni.getStorageSync('actPerfor').activity_id
			this.actTitle = uni.getStorageSync('actPerfor').name
			this.getStoreInfo()
		},
		onShow() {
			let time = new Date()
			this.y = time.getFullYear()
			this.m = time.getMonth()+1
			this.d = time.getDate()
			this.h = time.getHours()
			this.min = time.getMinutes()
			this.sec = time.getSeconds()
			if(this.m < 10){
				this.m = '0'+ this.m
			}
			if(this.h < 10){
				this.h = '0'+ this.h
			}
			if(this.min < 10){
				this.min = '0'+ this.min
			}
			if(this.d < 10){
				this.d = '0'+ this.d
			}
			this.lastEndDay = parseInt(this.d)+1
			if(this.lastEndDay < 10){
				this.lastEndDay = '0'+ this.lastEndDay
			}
			this.startTime = `${this.h}:${this.min}`
			this.endTime = `${this.h}:${this.min}`
			this.startDate = `${this.y}-${this.m}-${this.d}`
			this.endDate = `${this.y}-${this.m}-${this.lastEndDay}`
			this.start_date = `${this.startDate} ${this.startTime}`
			this.end_date = `${this.endDate} ${this.endTime}`
			this.startAllTime = new Date(this.start_date).getTime()
			this.endAllTime = new Date(this.end_date).getTime()
			this.gainCouponAct()
		},
		onShareAppMessage(res) {
			let _self = this
			return {
				title:  _self.store_info.nickname + '邀请您领取' + _self.actTitle + '活动的优惠券', // 分享描述
				path: '/pages/memberCenter/activityManage/exclusiveCoupon/getCoupon/getCoupon?store_id=' + 
				_self.$store.getters.getStoreId + '&customer_id=' + _self.store_info.customer_id + 
				'&activity_id=' + _self.actId + '&activity_coupon_customer_id=' + _self.activity_coupon_customer_id,
				imageUrl: uni.getStorageSync('actPerfor').image[0].image, // 分享图标
			}
		},
		methods:{
			getStoreInfo(){
				const data = {
					customer_store_id:this.store_id
				}
				this.$api.getCustomerInfo(data).then(res => {
					this.store_info = res.data.userinfo
					this.activity_coupon_customer_id = res.data.activity_coupon_customer_id
				}).catch( err => {
					console.log(err)
				})
			},
			share(item){
				console.log(item)
				if(item.customer_id == 0){
					// this.$refs.shareTip.open()
					const _self = this
					
					const data = {
						token:this.$store.getters.getToken,
						customer_store_id:this.store_id
					}
					
					this.$api.getCustomerInfo(data).then(res => {
						
						if(!res.status){
							return false
						}
						// console.log(res.data,'store res.data')
						// return false
						
						const store_info = res.data.userinfo
						console.log(store_info,'1')
						// 进行签名的时候  Android 不用使用之前的链接， ios 需要
						let signLink = /(Android)/i.test(navigator.userAgent) ? location.href : window.entryUrl;
						let data = {
							token:_self.$store.getters.getToken,
							url:signLink
						}
						
						this.$api.gain_share_data(data).then( res => {
							const shareConfig = JSON.parse(res.data)
							
							console.log(shareConfig,'share res.data')
							this.$refs.shareTip.open()
							wx.config(shareConfig)
							wx.ready(function(){
								
								wx.checkJsApi({
									jsApiList: [
										'updateTimelineShareData',
										'updateAppMessageShareData',
										'onMenuShareAppMessage',
										'onMenuShareTimeline'
									],
									success: function(res) {
										console.log('接口检测成功:'+res);
									},
									error: function(err) {
										console.log('接口检测失败:'+err);
									}
								})
								let data={
									token:_self.$store.getters.getToken,
									activity_coupon_id:item.activity_coupon_id
								}
								_self.$api.add_customer_coupon(data).then(res => {
									const shareData = {
										title: _self.actTitle, // 分享标题
										desc:  store_info.nickname + '邀请您领取' + _self.actTitle + '活动的优惠券', // 分享描述
										link: _self.current_url()+'/pages/memberCenter/activityManage/exclusiveCoupon/getCoupon/getCoupon?store_id=' + _self.$store.getters.getStoreId + '&customer_id=' + store_info.customer_id + '&activity_id=' + _self.actId + '&activity_coupon_customer_id=' + res.data.activity_coupon_customer_id,
										imgUrl: uni.getStorageSync('actPerfor').image[0].image, // 分享图标
										success: function (res) {
										  console.log(res,'success ---')
										},
										fail:function(err){
											console.log(err.errMsg,'fail ---')
										}
									}
									wx.updateAppMessageShareData(shareData);
									wx.updateTimelineShareData(shareData);
								})
								
							})
							wx.error(function(res){
								console.log(res,'wx.error')
							})					
						}).catch( err => {
							
							console.log(err)
						})
						
					}).catch( err => {
						console.log(err)
					})
					
					
				}else{
					uni.showToast({
						title:'此优惠券已被领取！',
						icon:'none',
						duration:2000
					})
				}
			},
			stopUse(){
				let data = {
					token:this.$store.getters.getToken,
					activity_coupon_id:this.activity_coupon_id,
					status:0
				}
				this.$api.edit_act_coupon(data).then(res => {
					console.log(res)
					if(res.status){
						uni.showToast({
							title:'优惠券停用成功',
							icon:'none',
							duration:2000
						})
						setTimeout(()=>{
							this.$refs.editCouponPopup.close()
							this.gainCouponAct()
						},1000)
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			editCoupon(){
				this.startAllTime = new Date(this.start_date).getTime()
				this.endAllTime = new Date(this.end_date).getTime()
				if(this.startAllTime > this.endAllTime){
					uni.showToast({
						title:'优惠券有效期开始时间不得大于结束时间',
						icon:'none',
						duration:2000
					})
					// return false
				}
				let data = {
					token:this.$store.getters.getToken,
					activity_coupon_id:this.activity_coupon_id,
					deduction_amount:this.couponNum,
					start_date:this.start_date,
					end_date:this.end_date,
					customer_id:this.customer_id,
					customer_receive_date:this.customer_receive_date,
					used:this.used,
					used_date:this.used_date
				}
				this.$api.edit_act_coupon(data).then(res => {
					console.log(res)
					if(res.status){
						uni.showToast({
							title:'优惠券修改成功',
							icon:'none',
							duration:2000
						})
						setTimeout(()=> {
							this.$refs.editCouponPopup.close()
							this.gainCouponAct()
						},1000)
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			gainCouponAct(){
				let data = {
					token:this.$store.getters.getToken,
					activity_id:this.actId,
					page:1,
					pageSize:this.pageSize
				}
				this.$api.get_coupon_list(data).then(res => {
					console.log(res)
					if(res.status){
						this.actCouponList = res.list.data
						console.log(this.actCouponList,'活动优惠券列表')
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			addCoupon(){
				let time = `${this.y}-${this.m}-${this.d}`
				if(this.startAllTime > this.endAllTime){
					uni.showToast({
						title:'优惠券有效期开始时间不得大于结束时间',
						icon:'none',
						duration:2000
					})
					return false
				}
				let data = {
					token:this.$store.getters.getToken,
					activity_id:this.actId,
					deduction_amount:this.couponNum,
					start_date:this.start_date,
					end_date:this.end_date,
					customer_id:0,
					customer_receive_date:time,
					used:0,
					used_date:''
				}
				this.$api.add_act_coupon(data).then(res => {
					console.log(res)
					if(res.status){
						uni.showToast({
							title:'添加活动优惠券成功',
							icon:'none',
							duration:2000
						})
						setTimeout(() => {
							this.$refs.addCouponPopup.close()
							this.gainCouponAct()
						},1000)
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none',
							duration:2000
						})
					}
				}).catch(err => {
					console.log(err)
				})
			},
			closeStateAdd(){
				this.$refs.addCouponPopup.close()
			},
			closeState(){
				this.$refs.editCouponPopup.close()
			},
			async getCustomer(){
				const data = {
					token:this.token,
					store_id:this.store_id
				}
				let permission = false
				 await this.$api.getCustomerInfo(data).then(res => {
					console.log(res,'角色')
					if(res.status){
						if(res.data.role != 3){
							uni.showToast({
								title:'您暂无添加优惠券的权限',
								icon:'none',
								duration:2000
							})
							permission = false
							return false
						}else{
							permission = true
						}
					
					}
				}).catch(err => {
					console.log(err)
				})
				
				return permission
			},
			async setCoupon(){
				let permission=await this.getCustomer()
				console.log(permission)
				if(permission){
					this.couponNum = ''
					this.startTime = `${this.h}:${this.min}`
					this.endTime = `${this.h}:${this.min}`
					this.startDate = `${this.y}-${this.m}-${this.d}`
					this.endDate = `${this.y}-${this.m}-${this.lastEndDay}`
					this.start_date = `${this.startDate} ${this.startTime}`
					this.end_date = `${this.endDate} ${this.endTime}`
					this.$refs.addCouponPopup.open()
				}
			},
			updataCoupon(item){
				this.couponNum = item.deduction_amount
				this.start_date = item.start_date
				this.end_date = item.end_date
				this.activity_coupon_id = item.activity_coupon_id
				this.customer_id = item.customer_id
				this.customer_receive_date = item.customer_receive_date
				this.used = item.used
				this.used_date = item.used_date
				this.status = item.status
				console.log(item.end_date)
				this.$refs.editCouponPopup.open()
			},
			// 活动开始时间
			dateStartChange(e){
				let str = e.target.value.toString()
				this.startDate = str
				this.end_date = `${this.endDate} ${this.endTime}`
				this.endAllTime = new Date(this.end_date).getTime()
			},
			timeStartChange(e){
				let str = e.target.value.toString()
				this.startTime = str
				this.start_date = `${this.startDate} ${this.startTime}`
				this.startAllTime = new Date(this.start_date).getTime()
			},
			// 活动结束时间
			dateEndChange(e){
				let str = e.target.value.toString()
				this.endDate = str
				this.end_date = `${this.endDate} ${this.endTime}`
				this.endAllTime = new Date(this.end_date).getTime()
			},
			timeEndChange(e){
				let str = e.target.value.toString()
				this.endTime = str
				this.end_date = `${this.endDate} ${this.endTime}`
				this.endAllTime = new Date(this.end_date).getTime()
			},
		}
	}
</script>

<style>
	.popup_box_de_share{
		width: 100%;
		height: 100%;
	}
	.popup_box_close_share{
		width: 300upx;
		height: 300upx;
		position: fixed;
		top: 10upx;right: 10upx;
	}
	.stop-use{
		width: 500upx;
		height: 88upx;
		line-height: 88upx;
		text-align: center;
		color: #666666;
		font-size: 32upx;
		border-radius: 44upx;
		margin: 0 auto;
		margin-top: 20upx;
		background: #F3F3F4;
	}
	/* 新增优惠券 */
	.popup_box_de{
		height: 846upx;
		width: 592upx;
		position: relative;
		/* z-index: 999; */
	}
	.popup_box_close{
		width: 52upx;
		height: 52upx;
		position: absolute;
		top: 0;
		right: 0;
	}
	.popup_box_content{
		width: 100%;
		height: 784upx;
		background: #FFFFFF;
		position: absolute;
		top: 62upx;left: 0;
		z-index: 999;
		border-radius: 16upx;
	}
	.popup_box_title{
		width: 100%;
		display: flex;
	}
	.popup-line{
		width: 84upx;
		height: 2upx;
		border-top: 1upx solid #DEDEDE;
		margin-top: 64upx;
		margin-left: 20upx;
		margin-right: 22upx;
	}
	.popup_box_title>view:nth-child(2){
		color: #333333;
		font-size: 34upx;
		margin-top: 40upx;
	}
	.popup_box_coupon-content{
		padding: 20upx;
		box-sizing: border-box;
	}
	.popup_box_coupon_sum{
		color: #333333;
		font-size: 28upx;
		line-height: 80upx;
		margin-top: 40upx;
		display: flex;
	}
	.popup_box_coupon_sum>input{
		width: 290upx;
		height: 80upx;
		padding: 20upx;
		box-sizing: border-box;
		font-size: 28upx;
		background: #F5F5F5;
		border-radius: 4upx;
		margin: 0 10upx;
	}
	.popup_box_coupon-validity{
		color: #333333;
		font-size: 28upx;
		margin-top: 40upx;
		font-weight: 800;
	}
	.act-time-set{
		width: 100%;
		line-height: 80upx;
		display: flex;
		background: #F5F5F5;
		border-radius: 4upx;
		font-size: 28upx;
		margin-top: 20upx;
	}
	.act-time-set>view:first-child{
		color: #333333;
		width: 27%;
		background: #ECECEC;
		text-align: center;
	}
	.start-data{
		width: 40%;
		color: #333333;
		padding-left: 14upx;
		box-sizing: border-box;
		text-align: center;
	}
	.start-time{
		width: 30%;
		color: #333333;
		text-align: center;
	}
	.popup_box-set-coupon{
		width: 500upx;
		height: 88upx;
		line-height: 88upx;
		text-align: center;
		color: #FFFFFF;
		font-size: 32upx;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 44upx;
		box-shadow: 0 8upx 16upx 0 rgba(166, 13, 0, 0.23);
		margin: 0 auto;
		margin-top: 86upx;
	}
	page{
		background: #F3F3F4;
	}
	.exclusive-coupon-page{
		width: 100%;
	}
	.exclusive-coupon-content{
		width: 100%;
		background: #FFFFFF;
		padding: 0 30upx;
		padding-bottom: 34upx;
		box-sizing: border-box;
	}
	.exclusive-coupon-title{
		width: 100%;
		padding: 28upx 0 30upx ;
		box-sizing: border-box;
		border-bottom: 1upx solid #DEDEDE;
		color: #333333;
		font-size: 34upx;
	}
	.set-exclusive-coupon{
		width: 638upx;
		height: 88upx;
		line-height: 88upx;
		text-align: center;
		color: #FFFFFF;
		font-size: 32upx;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 44upx;
		box-shadow: 0 8upx 16upx 0 rgba(166, 13, 0, 0.23);
		margin: 0 auto;
		margin-top: 34upx;
	}
	.exclusive-coupon-contain{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.produce-coupon{
		color: #333333;
		font-size: 30upx;
		margin-bottom: 30upx;
	}
	.coupon-details{
		width: 100%;
		height: 230upx;
		background: #FFFFFF;
		border-radius: 10upx;
		display: flex;
		margin-bottom: 20upx;
		box-shadow: 0 2upx 22upx 0 rgba(0, 0, 0, 0.09);
	}
	.coupon-details-left{
		width: 30%;
		height: 100%;
		background: url(https://tool.tuanhaoke.cn/static/image/member/active_background_coupon.png) no-repeat;
		background-size: 100% 100%;
		color: #FFFFFF;
		padding-top: 50upx;
		box-sizing: border-box;
	}
	.coupon-details-right{
		width: 73%;
		padding: 20upx;
		box-sizing: border-box;
	}
	.coupon-details-left>view:first-child{
		font-size: 48upx;
		text-align: center;
	}
	.coupon-details-left>view>text{
		font-size: 32upx;
	}
	.coupon-details-left>view:last-child{
		font-size: 22upx;
		opacity: 0.8;
		display: inline-block;
		width: 136upx;
		margin-left: 32upx;
		text-align: center;
	}
	.coupon-title{
		height: 64upx;
		color: #333333;
		font-size: 28upx;
	}
	.flash-sale{
		width: 100%;
		display: flex;
		justify-content: space-between;
		margin-top: 26upx;
	}
	.normal-use{
		width: 128upx;
		height: 48upx;
		color: #FF8B46;
		font-size: 24upx;
		border: 1upx solid #FF8B46;
		line-height: 48upx;
		border-radius: 4upx;
		text-align: center;
	}
	.cancel-use{
		width: 128upx;
		height: 48upx;
		font-size: 24upx;
		border: 1upx solid #666666;
		color: #666666;
		line-height: 48upx;
		border-radius: 4upx;
		text-align: center;
	}
	.by-get{
		width: 160upx;
		height: 48upx;
		line-height:48upx;
		color: #FFFFFF;
		text-align: center;
		background: linear-gradient(to right,#FE9543,#FF664F);
		border-radius: 4upx;
		box-shadow: 0 6upx 10upx 0 rgba(166, 13, 0, 0.23);
		font-size: 24upx;
	}
	.by-get-no{
		width: 160upx;
		height: 48upx;
		line-height:48upx;
		text-align: center;
		background: #F3F3F4;
		color: #999999;
		box-shadow: none;
		border-radius: 4upx;
		font-size: 24upx;
	}
	.expire-time{
		width: 100%;
		padding: 6upx 0;
		box-sizing: border-box;
		border-top: 1upx dashed #D8D8D8;
		display: flex;
		justify-content: space-between;
		margin-top: 20upx;
	}
	.expire-time>image{
		width: 28upx;
		height: 28upx;
		margin-top: 4upx;
	}
	.expire-time>view{
		color: #999999;
		font-size: 24upx;
	}
	.coupon-explain{
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		background: #FFFFFF;
		margin-top: 20upx;
	}
	.coupon-explain-title{
		color: #333333;
		font-size: 30upx;
		font-weight: 900;
	}
	.common-coupon:first-child{
		margin-top: 30upx;
	}
	.common-coupon{
		color: #666666;
		font-size: 28upx;
		margin-top: 20upx;
	}
</style>
